
package command;

public class Attack extends Command{
    public Attack(String name, Type type, int requiredLevel, int damage, int succesRate){
    	super(name, CommandType.ATTACK);
        this.requiredLevel = requiredLevel;
        this.damage = damage;
        this.successRate = succesRate;
    }
    
    public Attack(String name, Type type, int requiredLevel, int damage, int succesRate, boolean enemy){
    	super(name, enemy?CommandType.ENEMY_ATTACK:CommandType.ATTACK);
        this.requiredLevel = requiredLevel;
        this.damage = damage;
        this.successRate = succesRate;
    }

    public int getRequiredLevel(){
        return requiredLevel;
    }

    public int getDamage(){
        return damage;
    }

    public int getSuccesRate(){
        return successRate;
    }
    
    public String toString(){
    	return getName()+" "+getDamage()+" "+getSuccesRate();
    }

    public Type getAttackType(){
		return type;
	}
	
	private Type type;
	public enum Type {MELEE, DISTANCE, MAGIC}
    private int damage, requiredLevel, successRate;
}
